<template>
  <div>
    <el-row :gutter="20" type="flex">
      <el-col :span="5">
        <el-input
          placeholder="请输入题干关键字"
          v-model="listQueryIn.title"
          clearable
        >
        </el-input>
      </el-col>
	  <el-col :span="5">
	    <el-input
	      placeholder="请输入标签关键字"
	      v-model="listQueryIn.tags"
	      clearable
	    >
	    </el-input>
	  </el-col>
      <el-col :span="4">
        <QuestionBankTitleSelect
          :defaultValue="listQueryIn.bankId"
          @emit="(v) => (listQueryIn.bankId = v)"
        />
      </el-col>
      <el-col :span="4">
        <QuestionTypeSelect
          :defaultValue="listQueryIn.type"
          @emit="(v) => (listQueryIn.type = v)"
        />
      </el-col>
      <el-col :span="4">
        <QuestionDifficultySelect
          :defaultValue="listQueryIn.difficulty"
          @emit="(v) => (listQueryIn.difficulty = v)"
        />
      </el-col>
      <el-col :span="4">
        <el-button type="primary" @click="refreshList()" plain>搜索</el-button>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  components: {
    QuestionDifficultySelect: () =>
      import('../public/QuestionDifficultySelect.vue'),
    QuestionTypeSelect: () => import('../public/QuestionTypeSelect.vue'),
    QuestionBankTitleSelect: () =>
      import('../public/QuestionBankTitleSelect.vue'),
  },
  data() {
    return {
      listQueryIn: {},
    }
  },
  methods: {
    refreshList() {
      console.log(this.listQueryIn)
      this.$bus.$emit('refreshExamQuestion', this.listQueryIn)
    },
  },
}
</script>